home *** CD-ROM | disk | FTP | other *** search
/ Network CD 2 / Network CD - Volume 2.iso / programs / internet / terminal / vltfonebook.lha / VLTFoneBook / vlt.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1993-07-29  |  1.1 KB  |  41 lines

  1. /******************************************************************************
  2. *** vlt.rexx -- vlt startup script
  3. ***   if vlt is not running, lauch vlt
  4. ***   if vlt is on the background, wake it up.
  5. ******************************************************************************/
  6.  
  7. /** some of defaults **/
  8. vltfonedir = "VLTFoneBook:"         /** where phone book file locate **/
  9. memdir     = "ram:"                 /** where these file should relocated **/
  10.  
  11. /** when lauch a arexx from toolmanager, you need this **/
  12. address command
  13.  
  14. /**  copy phone book file if they are not there  **/
  15. if Getenv(vlt) = "" then do
  16.   file.1='VLTFoneBook.vlt'            /** specify these files **/
  17.   file.2='VLTDialer.rexx'    
  18.   file.3='VLTFoneBook'
  19.   do i=1 to 3
  20.     "copy "vltfonedir || file.i memdir
  21.   end
  22.   result = Setenv(vlt,"active")
  23. end
  24.  
  25. /** lauch vlt if it is not running already **/
  26. if ~show(ports,'VLT') then do       
  27.   "run >nil: Work:Comm/VLT/vlt"    
  28.   do until showlist('P',VLT)        /** wait for port to appear  **/
  29.     call delay(10)
  30.   end
  31. end
  32.  
  33. /**  start up the auto phone dialer  **/
  34. address vlt
  35.   "hangup"
  36.   "@"memdir || "VLTFoneBook.vlt"
  37.  
  38. exit
  39. /**  the end **/
  40.  
  41.